package com.hundunjiang.admin.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.hundunjiang.modules.form.service.SysAdminService01;
import com.hundunjiang.modules.form.entity.SysAdmin01;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "后台-系统管理-用户管理01")
@RequestMapping("/admin/system/user01")
@RestController
@SaCheckPermission(value = "sys.admin", orRole = "admin")
public class SysAdminController01 {


    @Resource
    private SysAdminService01 sysAdminService;

    @SaCheckPermission(value = "sys.admin*add", orRole = "admin")
    @Operation(summary = "后台用户添加", description = "后台用户添加")
    @RequestMapping(path = "/add", method = RequestMethod.POST)
    public void add(@RequestBody SysAdmin01 sysAdmin01) {
        sysAdminService.addUser(sysAdmin01);
    }
}
